﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using GD.ModelContest.Common;
using GD.ModelContest.Model;
using GD.ModelContest.Service;

namespace GD.ModelContest.Web
{
    public partial class Service : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(Request.QueryString["txtEmail"]))
            {
                string email = Request.QueryString["txtEmail"];

                int mailCount = ServiceLocator.IUserService.IsEmailAlreadyExisted(email);
                if (mailCount > 0)
                {
                    Response.Write("0");
                }
                else
                {
                    Response.Write("1");
                }
                Response.End();
            }
        }
    }
}
